Optimal. Leaf size=55 \[ \frac {3 x}{4 \sqrt {2}}-\frac {\sin (x) \cos (x)}{4 \left (\cos ^2(x)+1\right )}-\frac {3 \tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {2}+1}\right )}{4 \sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3184, 12, 3181, 203} \[ \frac {3 x}{4 \sqrt {2}}-\frac {\sin (x) \cos (x)}{4 \left (\cos ^2(x)+1\right )}-\frac {3 \tan ^{-1}\left (\frac {\sin (x) \cos (x)}{\cos ^2(x)+\sqrt {2}+1}\right )}{4 \sqrt {2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 203
Rule 3181
Rule 3184
Rubi steps
\begin {align*} \int \frac {1}{\left (1+\cos ^2(x)\right )^2} \, dx &=-\frac {\cos (x) \sin (x)}{4 \left (1+\cos ^2(x)\right )}-\frac {1}{4} \int -\frac {3}{1+\cos ^2(x)} \, dx\\ &=-\frac {\cos (x) \sin (x)}{4 \left (1+\cos ^2(x)\right )}+\frac {3}{4} \int \frac {1}{1+\cos ^2(x)} \, dx\\ &=-\frac {\cos (x) \sin (x)}{4 \left (1+\cos ^2(x)\right )}-\frac {3}{4} \operatorname {Subst}\left (\int \frac {1}{1+2 x^2} \, dx,x,\cot (x)\right )\\ &=\frac {3 x}{4 \sqrt {2}}-\frac {3 \tan ^{-1}\left (\frac {\cos (x) \sin (x)}{1+\sqrt {2}+\cos ^2(x)}\right )}{4 \sqrt {2}}-\frac {\cos (x) \sin (x)}{4 \left (1+\cos ^2(x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 35, normalized size = 0.64 \[ \frac {3 \tan ^{-1}\left (\frac {\tan (x)}{\sqrt {2}}\right )}{4 \sqrt {2}}-\frac {\sin (2 x)}{4 (\cos (2 x)+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 57, normalized size = 1.04 \[ -\frac {3 \, {\left (\sqrt {2} \cos \relax (x)^{2} + \sqrt {2}\right )} \arctan \left (\frac {3 \, \sqrt {2} \cos \relax (x)^{2} - \sqrt {2}}{4 \, \cos \relax (x) \sin \relax (x)}\right ) + 4 \, \cos \relax (x) \sin \relax (x)}{16 \, {\left (\cos \relax (x)^{2} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.29, size = 59, normalized size = 1.07 \[ \frac {3}{8} \, \sqrt {2} {\left (x + \arctan \left (-\frac {\sqrt {2} \sin \left (2 \, x\right ) - \sin \left (2 \, x\right )}{\sqrt {2} \cos \left (2 \, x\right ) + \sqrt {2} - \cos \left (2 \, x\right ) + 1}\right )\right )} - \frac {\tan \relax (x)}{4 \, {\left (\tan \relax (x)^{2} + 2\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 27, normalized size = 0.49 \[ -\frac {\tan \relax (x )}{4 \left (\tan ^{2}\relax (x )+2\right )}+\frac {3 \arctan \left (\frac {\tan \relax (x ) \sqrt {2}}{2}\right ) \sqrt {2}}{8} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.96, size = 26, normalized size = 0.47 \[ \frac {3}{8} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} \tan \relax (x)\right ) - \frac {\tan \relax (x)}{4 \, {\left (\tan \relax (x)^{2} + 2\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.17, size = 40, normalized size = 0.73 \[ \frac {3\,\sqrt {2}\,\left (x-\mathrm {atan}\left (\mathrm {tan}\relax (x)\right )\right )}{8}-\frac {\mathrm {tan}\relax (x)}{4\,\left ({\mathrm {tan}\relax (x)}^2+2\right )}+\frac {3\,\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\mathrm {tan}\relax (x)}{2}\right )}{8} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 3.44, size = 218, normalized size = 3.96 \[ \frac {3 \sqrt {2} \left (\operatorname {atan}{\left (\sqrt {2} \tan {\left (\frac {x}{2} \right )} - 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right ) \tan ^{4}{\left (\frac {x}{2} \right )}}{8 \tan ^{4}{\left (\frac {x}{2} \right )} + 8} + \frac {3 \sqrt {2} \left (\operatorname {atan}{\left (\sqrt {2} \tan {\left (\frac {x}{2} \right )} - 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{8 \tan ^{4}{\left (\frac {x}{2} \right )} + 8} + \frac {3 \sqrt {2} \left (\operatorname {atan}{\left (\sqrt {2} \tan {\left (\frac {x}{2} \right )} + 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right ) \tan ^{4}{\left (\frac {x}{2} \right )}}{8 \tan ^{4}{\left (\frac {x}{2} \right )} + 8} + \frac {3 \sqrt {2} \left (\operatorname {atan}{\left (\sqrt {2} \tan {\left (\frac {x}{2} \right )} + 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{8 \tan ^{4}{\left (\frac {x}{2} \right )} + 8} + \frac {2 \tan ^{3}{\left (\frac {x}{2} \right )}}{8 \tan ^{4}{\left (\frac {x}{2} \right )} + 8} - \frac {2 \tan {\left (\frac {x}{2} \right )}}{8 \tan ^{4}{\left (\frac {x}{2} \right )} + 8} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________